package com.kinyx.demo.entities.impl;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(uniqueConstraints = {
		@UniqueConstraint(columnNames = {
				"UK_20"
		}), //
		@UniqueConstraint(columnNames = {
				"uk_31", "uk_32"
		}), //
		@UniqueConstraint(name = "uka", columnNames = {
				"uk_40"
		}), //
		@UniqueConstraint(name = "ukb", columnNames = {
				"uk_51", "uk_52"
		}), //
})
public class UniqueKeysEntity {

	@Id
	@Column(nullable = false, updatable = false, length = 32)
	private String c00;

	// @Column(unique = true)单独分组。
	@Column(unique = true)
	private Integer uk_00;

	// @Table(uniqueConstraints)单独分组，未设置名称。
	private Integer uk_20;

	// @Table(uniqueConstraints)组合分组，未设置名称。
	private Integer uk_31;
	private Integer uk_32;

	// @Table(uniqueConstraints)单独分组，设置名称。
	private Integer uk_40;

	// @Table(uniqueConstraints)组合分组，设置名称。
	private Integer uk_51;
	private Integer uk_52;

}
